#ifndef WXLINE_H_INCLUDE_
#define WXLINE_H_INCLUDE_

#include "common.h"

enum NormalSide { NORMAL_RIGHT, NORMAL_LEFT };

class wxLine : NedAllocatedObject
{
public:
    wxLine();
    wxLine(wxPoint spos,wxPoint epos);
    ~wxLine();

    void setPosition(wxPoint spos,wxPoint epos);
    inline wxPoint getStartPos(void) { return mStartPos; }
    inline wxPoint getEndPos(void) { return mEndPos; }
    double GetLength() const;
    wxPoint GetPointAtLength(double length) const;
    wxPoint GetNormalPoint(const wxPoint& pointOnLine, double normalLength, NormalSide normalSide = NORMAL_RIGHT) const;

private:
    wxPoint mStartPos;
    wxPoint mEndPos;
};

#endif // WXLINE_H
